package org.study.controller;

import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.study.service.ChatAssistant;

/**
 * @author: jzhou
 * @date: 2025/7/6-18:15
 * @version: 1.0
 * @description: java-ai-study
 */
@RestController
@Slf4j
public class HighApiController {
    @Resource
    @Qualifier("normalChatAssistant")
    private ChatAssistant chatAssistant;

    // 访问地址：http://localhost:9004/high/api01?prompt=你是谁
    @GetMapping(value = "/high/api01")
    public String highApi(@RequestParam(value = "prompt", defaultValue = "你是谁") String prompt) {
        return chatAssistant.chat(prompt);
    }
}
